#include <iostream>
#include <unordered_map>
#include <string>
// #include <format>

using namespace std;

int main()
{
	unordered_map<int, string> m{
		{1, "Item 1"},
		{2, "Item 2"},
		{3, "Item 3"},
		{4, "Item 4"},
	};

	// Using C++17 structured bindings.
	for (const auto &[key, value] : m)
	{
		// cout << format("{} = {}", key, value) << endl;
		printf("%d = %s\n", key, value.c_str());
	}

	// Without structured bindings.
	for (const auto &p : m)
	{
		// cout << format("{} = {}", p.first, p.second) << endl;
		printf("%d = %s\n", p.first, p.second.c_str());
	}
}
